package code;

import code.Frame.*;
import javax.swing.*;
import java.awt.*;

public class Main
{
    public static final int WINDOW_WIDTH = 1024;
    public static final int WINDOW_HEIGHT = 768;
    public static JFrame frame;
    public static JPanel panel_now;

    public static int uid;

    public static void main(String[] args) throws Exception
    {
        MYSQL.getConnection();

        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        frame = new JFrame("校园食堂外送点餐系统");
        frame.setBounds(((int) screenSize.getWidth() - WINDOW_WIDTH) / 2, ((int) screenSize.getHeight() - WINDOW_HEIGHT) / 2,
                WINDOW_WIDTH, WINDOW_HEIGHT);
        frame.setSize(WINDOW_WIDTH, WINDOW_HEIGHT);
        panel_now = FrameManager.startPanel;
        frame.setContentPane(FrameManager.startPanel);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
    }
}
